$OpenBSD: patch-bin_9c,v 1.2 2017/05/09 22:22:36 gsoares Exp $
Index: bin/9c
--- bin/9c.orig
+++ bin/9c
@@ -3,7 +3,7 @@
 test -f $PLAN9/config && . $PLAN9/config
 usegcc()
 {
-	cc=${CC9:-gcc}
+	cc=${CC9:-${CC}}
 	ngflags=" \
 		-O2 \
 		-c \
@@ -54,7 +54,7 @@ quiet()
 
 useclang()
 {
-	cc=${CC9:-clang}
+	cc=${CC9:-${CC}}
 	ngflags=" \
 		-O2 \
 		-c \
@@ -79,6 +79,8 @@ useclang()
 
 tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}-${CC9:-cc}"
 case "$tag" in
+*OpenBSD*gcc*)		usegcc ;;
+*OpenBSD*clang*)	useclang ;;
 *FreeBSD*gcc*)	usegcc ;;
 *FreeBSD*clang*)	useclang ;;
 *DragonFly*|*BSD*)	usegcc ;;
